#pragma once
#include<iostream>
using namespace std;
namespace GIS20136
{

	void function(double arr[256][256])
	{
		int dx[] = { 1,-1,0, 0,1, 1 ,-1,-1 };
		int dy[] = { 0, 0,1,-1,1,-1, -1, 1 };
		double averagearr[256][256];
		for (int i = 0; i < 256; i++)
		{
			for (int j = 0; j < 256; j++)
			{
				if (i > 0 && j > 0 && i < 255 && j < 255)
				{
					double sum = 0;
					for (int k = 0; k < 8; k++)
					{
						sum += arr[j + dx[k]][i + dy[k]];
					}
					averagearr[i][j] = sum / 9;
				}
				else
				{
					averagearr[i][j] = arr[i][j];
				}
			}
		}
	}
}